package com.xbts.system.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.Data;
import com.xbts.common.annotation.Excel;
import com.xbts.common.utils.StringUtils;
import com.xbts.common.core.domain.BaseEntity;

/**
 * 政务云服务器类型对象 cn_government_cloud_type
 *
 * @author xbts
 * @date 2023-08-23
 */
@Data
@ApiModel("政务云服务器类型对象")
@TableName("cn_government_cloud_type")
public class CnGovernmentCloudType extends BaseEntity {

private static final long serialVersionUID=1L;

    /** 政务云服务器类型主键 */
    @TableId
    private String serverTypeId;

    /** 政务云服务器类型名称 */
    @Excel(name = "政务云服务器类型名称")
    @ApiModelProperty("政务云服务器类型名称")
    @NotEmpty(message = "政务云服务器类型名称不能为空")
    private String serverType;

    /** 是否删除（0false 1true） */
    @Excel(name = "是否删除", readConverterExp = "0=false,1=true")
    @ApiModelProperty("是否删除")
    private String deleteFlag;


    public<T> QueryWrapper<T> queryWrapper(){
        QueryWrapper<T> queryWrapper=new QueryWrapper<>();
        queryWrapper.like(StringUtils.isNotEmpty(serverType),"service_type", serverType);
        queryWrapper.like(StringUtils.isNotEmpty(deleteFlag),"delete_flag",deleteFlag);
        return queryWrapper;
    }
}